package com.yiyuan.km.service;

import java.util.List;

import com.yiyuan.common.exception.SubRecExistException;
import com.yiyuan.km.model.KmReview;
import com.yiyuan.km.model.KmType;
import com.yiyuan.km.model.Knowledge;

public interface IKmService {
	/** **************分类操作***************************** */
	public void addType(KmType kmType);

	public void updateType(KmType kmType);

	public void deleteType(Integer typeId) throws SubRecExistException;

	public KmType getType(Integer typeId);

	public List<KmType> findSubTypeList(String typeId);

	public void moveType(Integer sTypeId, Integer tTypeId);

	/** **************知识操作****************************** */
	public void addKm(Knowledge knowledge);

	public void updateKm(Knowledge knowledge);

	public void deleteKm(Knowledge knowledge);

	public Knowledge getKm(Integer kmId);

	public List<Knowledge> findKmList(int startIndex, int endIndex);

	public int getKmPageCount();

	/** **************知识评论操作****************************** */
	public void addReview(KmReview kmReview);

	public void deleteReview(KmReview kmReview);

	public void updateReview(KmReview kmReview);

	public List<KmReview> findReviewList(int startIndex, int endIndex,
			Integer kmId);

	public int getReviewPageCount(Integer kmId);

}
